<!DOCTYPE html>
<html>
<head>
	<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
	<meta charset="utf-8">
	<link rel="stylesheet" type="text/css" href="General-style.css">
	<script src="jquery.min.js"></script>
	<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
	<title>陕西服装工程学院-电脑维修预约</title>
</head>
<body>
	<div class="wrap">
		<div class="top">
			<div class="top_one">
				<div class="content">
					<ul>
						<li><a href="Home-page.html">退出</a></li>
						<li><a href="#">未登录</a></li>
					</ul>
				</div>
			</div>
			<div class="content top_two"><img src="images/logo.png"></div>
		</div>
		<div class="middle">
			<p>陕西服装工程学院-校园电脑维修预约</p>
			<div class="content register">
				<div class="message">
					<span>账号：</span><input type="text" placeholder="学生为学号，教师为教职工号"><br>
					<span>密码：</span><input type="password" placeholder="默认与教职工号或学号一致"><br>
					<span>电话：</span><input type="text" placeholder="有效的手机号"><br>
					<span>地址：</span><input type="text" placeholder="10号楼603/B区205（维修地址）"><br>
					<span>离校：</span><input type="text" placeholder="预计离校年份 如：2015 教师不填"><br>
					<span>注：注册完成后返回首页登录，请认真注册，后期工作将根据注册信息进行！！！</span>
				</div>
				<a id="register" href="#">确认注册</a>
				<a href="Home-page.html">返回首页</a>
			</div>
		</div>
		<div class="foot">
			<div class="content clear">
				<ul>
					<li><img src="images/weixin.jpg"><p>学院官方微信</p></li>
					<li><img src="images/sina.jpg"><p>招就办官方微信</p></li>
				</ul>
				<ol>
					<li><p>陕西服装工程学院</p></li>
					<li>校址：西安市西咸新区沣西新城崇文路1号</li>
					<li>招生：029-38114101 38114102 </li>
					<li>传真：029-38114112</li>
					<li>邮编：712046</li>
				</ol>
			</div>
		</div>
	</div>
	<script>
		$("#register").click(function(){
			var arr = [];
			$(".message input").each(function(index,element){
				arr[index] = this.value;
			})
			$.ajax({
				url:`http://127.0.0.1:81/register`,
				data:{
					accountnumber:arr[0],
					password:arr[1],
					telephone:arr[2],
					address:arr[3],
					year:arr[4],
				},
				success:function(data){
					if(data === "注册成功"){
						alert("注册成功！")
					}
					else{
						alert("注册失败（或账号已注册）！")
					}
				},
			})
		})
	</script>
</body>
</html>